<include file="Public:head" title='特效详情' />
<script src="__PUBLIC__/js/other/validate.js"></script>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Jquery/lists')}">特效管理</a></li>
                    <li class="active">特效列表</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">特效{$Think.get.id|getPageType}</h3>
                                <form id="form" enctype="multipart/form-data" method="POST" action="{:U('Jquery/check_post')}" onsubmit="return checkJsForm()">
                                    <div class="caption">
                                        <table class="table table_detail">
                                            <tr>
                                                <td class="td_left">标题</td>
                                                <td>
                                                    <input type="text" value="{$detail.name}" name="name" id="name" autocomplete="off"/>
                                                    <span class="tip">本站已有的素材，不能审核通过</span>  
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">描述</td>
                                                <td>
                                                    <textarea class="textarea" name="description" id="description" autocomplete="off">{$detail.description}</textarea>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">分类</td>
                                                <td>
                                                    <div class="cats">
                                                        <if condition="$detail['cat_id'] eq 15">
                                                            <input type='hidden' name='cat_id' value='15'/>
                                                            <else/>
                                                            <select class="chosen-select" id="cat_id" name="cat_id" autocomplete="off" onchange="changeCats(this.value,'{$table}')" style="width:150px;">
                                                                <option value="">请选择分类</option>
                                                                <foreach name="cats" item="row">
                                                                    <option value="{$row.id}" {$row.id|getEqual=###,$detail['cat_id'],'selected'}>{$row.name}</option>
                                                                </foreach>
                                                            </select>
                                                        </if>

                                                        <select class="chosen-select" id="cat_sub_id" name="cat_sub_id" data_cat_sub_id="{$detail['cat_sub_id']}" autocomplete="off" style="width:150px">
                                                            <option value="">请选择子分类</option>
                                                            <foreach name="cats_sub" item="row">
                                                                <option value="{$row.id}" {$row.id|getEqual=###,$detail['cat_sub_id'],'selected'}>{$row.name}</option>
                                                            </foreach>
                                                        </select>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">上传封面图</td>
                                                <td>
                                                    <a id="big_img_area">
                                                        <if condition="$detail.logo_big neq ''">
                                                            <a class="fancybox_img" title="{$row.title}" href="__APP__/{$detail.logo_big}"><img src="__APP__/{$detail.logo_big}" style="max-height:300px" alt="封面图" class="cover_img" id="cover_img"/></a>
                                                            <else/>
                                                            <img src="__PUBLIC__/images/cover.jpg" alt="封面图" class="cover_img" id="cover_img"/>
                                                        </if>
                                                        <input name="logo_big" value="{$detail.logo_big}" type="hidden" autocomplete="off"/>
                                                    </a>
                                                    <a class="cover_btn" id="cover_btn_big"><span>+</span></a>
                                                    <span class="tip">建议760*980px像素的图片。宽高范围：500px<=宽度<=1000px，高度<=1500px</span>  
                                                </td>
                                            </tr>

                                            <tr>
                                                <td class="td_left">上传源文件</td>
                                                <td>
                                                    <a id="zips_area">
                                                        <input id="zip_input"  value='{$detail.zip}' type="text" style="background:#ddd;width:350px;margin:20px 16px 0 0" disabled="disabled" autocomplete="off"/>
                                                    </a>
                                                    <a class="cover_btn" id="zip_btn"><span>+</span></a>
                                                    <span class="tip">根目录必须含有“index.html”否则无法演示不能通过审核。</span>  
                                                    <input type="hidden" name="zip" id="zip" autocomplete="off" value='{$detail.zip}'/>
                                                    <a href="__APP__/{$detail.zip}">点击下载</a>
                                                </td>
                                            </tr>

                                            <include file="Uploads:original" />
                                            <if condition="$detail.mtype eq 1">
                                                <tr>
                                                    <td class="td_left">颜色</td>
                                                    <td>
                                                <foreach name="modal_colors" item="row">
                                                    <label class='label_width'>
                                                        <input type='checkbox' value='{$row.id}' name='color_id[]' {$detail.color_id|getChecked=###,$row['id']} autocomplete="off">
                                                        {$row.name}
                                                    </label>
                                                </foreach>
                                                </td>
                                                </tr>
                                                <tr>
                                                    <td class="td_left">布局</td>
                                                    <td>
                                                <foreach name="modal_lays" item="row">
                                                    <label class='label_width'>
                                                        <input type='radio' value='{$row.id}' name='lay_id' {$detail.lay_id|getEqual=###,$row['id'],'checked'} autocomplete="off">
                                                        {$row.name}
                                                    </label>
                                                </foreach>
                                                </td>
                                                </tr>
                                                <else/>
                                                <tr>
                                                    <td class="td_left">难易级别</td>
                                                    <td>
                                                <foreach name="js_easy" item="row">
                                                    <label style="width:70px">
                                                        <input class="ace" type="radio" name="easy_id" value='{$row.id}' {$detail.easy_id|getEqual=###,$row['id'],'checked'} autocomplete='off'/>
                                                        <span class="lbl"> {$row.name}</span>
                                                    </label>

                                                </foreach>
                                                </td>
                                                </tr>
                                            </if>
                                            <tr>
                                                <td class="td_left">来源</td>
                                                <td>
                                                    <input type="text" value="{$detail.source}" placeholder="http://www.sucaihuo.com" name="source" autocomplete="off"/>
                                                    <span class="tip">链接地址如：“http://www.sucaihuo.com”</span>  
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">相关标签</td>
                                                <td>
                                                    <span class="tags_relative" id="tags_relative">
                                                        <foreach name='tags' item='row'>
                                                            <a target="_blank" href="__APP__/js/tag-{$row}">{$row}</a>
                                                        </foreach>
                                                    </span>
                                                    <a class="add_tags" title="添加标签" onclick="addTags(0)" href="javascript:;">+标签</a>
                                                    <input type="hidden" name="tags" id="tags" value='{$detail.tags}'/>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div class="course">
                                        <if condition="$detail.mtype eq 2 or $detail.mtype eq 20"><h2><strong class="normal">教程</strong></h2></if>
                                        <table class="table table_detail" id="table_course">
                                            <if condition="$detail.mtype eq 2 or $detail.mtype eq 20">
                                                <tr>
                                                    <td class="td_left"></td>
                                                    <td>
                                                        <ul id="module_list">
                                                            <foreach name="jsons" item="row">
                                                                <li>
                                                                    <div class="item_top clearfix">
                                                                        <div class="item_ico">{$key+1}</div>
                                                                        <div class="item_content"><textarea name="contents[]" autocomplete="off" onkeyup="checkCourseContent($(this))">{$row.content}</textarea></div>
                                                                        <div class="item_nav">
                                                                            <a class="move-btn bg"></a>
                                                                            <a class="delete-btn bg"></a>
                                                                            <a class="add-btn bg"></a>
                                                                            <a class="plupload_btn"></a>
                                                                            <ul class="js-upload-image-list upload-image-list clearfix" onclick="addWebuploadCurrent($(this))">
                                                                                <li class="fileinput-button js-add-image webuploader-container" data-type="loading">
                                                                                    <div class="webuploader-pick">
                                                                                        <a class="fileinput-button-icon" href="javascript:;"></a>
                                                                                    </div>
                                                                                </li>
                                                                            </ul>
                                                                            <div  class="cats_type clearfix">
                                                                                <a class="chose_type">{$row.type|getUploadsCatsType}</a>
                                                                                <a class="sub"  data-type=0>段落</a>
                                                                                <a class="sub"  data-type=4>标题</a>
                                                                                <a class="sub"  data-type=1>html</a>
                                                                                <a class="sub"  data-type=2>js</a>
                                                                                <a class="sub"  data-type=3>css</a>
                                                                                <span class="arrow arrow-up"></span> 
                                                                                <input type="hidden" name="types[]" value="{$row.type}" autocomplete="off"/>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <ul class="course_imgs clearfix">
                                                                        <foreach name="row['pics']" item='row2'>
                                                                            <li class="thumb">
                                                                                <img src="__APP__/{$row2}" data-pic="{$row2}"/>
                                                                                <a class="media-rm-btn hide"></a>
                                                                            </li>
                                                                        </foreach>
                                                                    </ul>
                                                                </li>
                                                            </foreach>
                                                        </ul>

                                                    </td>
                                                </tr>
                                            </if>
                                            <tr>
                                                <td class="td_left">状态</td>
                                                <td>
                                                    <label>
                                                        <input class="ace" type="radio"  name="state" value='-1' {$detail.state|getEqual=###,-1,'checked'} autocomplete='off'/>
                                                        <span class="lbl"> 拒绝</span>
                                                    </label>
                                                    <label>
                                                        <input class="ace" type="radio"  name="state" value='0' {$detail.state|getEqual=###,0,'checked'} autocomplete='off'/>
                                                        <span class="lbl"> 待审核</span>
                                                    </label>
                                                    <label>
                                                        <input class="ace" type="radio"  name="state" value='2' {$detail.state|getEqual=###,2,'checked'} autocomplete='off'/>
                                                        <span class="lbl"> 推送</span>
                                                    </label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">原因</td>
                                                <td>
                                                    <textarea class="textarea" name="reason" id="reason" autocomplete="off">{$detail.reason}</textarea>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left"></td>
                                                <td>
                                                    <input type='hidden' name='id' value='{$Think.get.id}'/>
                                                    <button class="btn btn-info btn-sm" type="submit">
                                                        <i class="icon-ok bigger-110 "></i>
                                                        保 存
                                                    </button>
                                                    <button class="btn btn-sm reset" type="button" onclick="goUrl(-1)">
                                                        <i class="icon-undo bigger-110"></i>
                                                        返 回
                                                    </button>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>
<include file="Public:foot" />
<div class="modal fade" id="modal_cat" data-id="0" data-modal="position"  tabindex="-1" role="dialog" aria-labelledby="modal_catLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" ></h4>
            </div>
            <div class="modal-body">
                名称：
                <input id="cat_name" type="text" class="common_txt" value="{$detail.ord}" maxlength="20" autocomplete="off"/>
            </div>
            <div class="modal-footer">
                <button class="btn btn-danger btn-xs ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="submit" role="button" aria-disabled="false" >
                    <span class="ui-button-text">
                        <i class="icon-trash bigger-110"></i>
                        确 定
                    </span>
                </button>
                <button class="btn btn-xs ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="button" role="button" aria-disabled="false" data-dismiss="modal">
                    <span class="ui-button-text">
                        <i class="icon-remove bigger-110"></i>
                        取 消
                    </span>
                </button>

            </div>
        </div>
    </div>
</div>
<include file="Uploads:plupload" />
<link rel="stylesheet" href="__PUBLIC__/css/uploads.css" type="text/css" /> 

<script type="text/javascript" src="__PUBLIC__/js/plugins/jquery.dragsort-0.5.2.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/plugins/textarea_autoheight.js"></script>
<script type="text/javascript" src="__APP__/other/js/uploads.js"></script>